Per-developer GitHub Environments architecture#402
Merged
james-tn merged 4 commits intoint-agenticfrom Feb 13, 2026
Merged
Conversation
added 2 commits
February 13, 2026 08:22
- Create 6 GitHub environments: production, integration-james, integration-nicole, integration-heena, integration-tim, integration-matt - Move all variables from repo-level to environment-level - Update orchestrate.yml: *-dev branch integration-<name> mapping - Uncomment environment: binding in all 7 reusable workflows - Fix TF state key: use environment name instead of branch name - Fix destroy.yml bugs: iteration var and unsanitized state key - Remove auto-destroy (all environments persist) - Add OIDC federated credentials for integration-james and production - Create prod.tfvars for production environment - Update GITHUB_ACTIONS_SETUP.md with developer onboarding guide
When a Terraform apply fails midway (e.g., timeout, quota), resources may exist in Azure but not in TF state. On retry, Terraform fails with 'already exists'. This change adds a retry loop (max 3 attempts) that: 1. Detects 'already exists' errors in apply output 2. Parses the TF resource address and Azure resource ID 3. Auto-imports orphaned resources into state 4. Retries the apply Eliminates need for manual deletion via Azure Portal.
- Rename 'Orchestrate Deployment' -> 'CI/CD Pipeline' - Remove int-agentic from pull_request trigger PRs to int-agentic were failing because environment 'integration' has no OIDC federated credential. PR validation only needed for main (production gate). - Simplify base_ref case statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements per-developer GitHub Environments architecture so each team member deploys to their own Azure subscription with isolated infrastructure, OIDC credentials, and Terraform state.
Changes
Workflow Updates (all 7 workflows)
*-devbranch triggers with branch-to-environment mapping (james-devtointegration-james), removed auto-destroyvars.*references, TF state key based on environment name (not branch), sanitize step for environment namestr -d '-') to match Terraform'sreplace("-", "")environment:binding for OIDC + eval variablesInfrastructure
Documentation
GitHub Environment Setup
production,integration-james,integration-nicole,integration-heena,integration-tim,integration-mattPipeline Test Results (Run #21995998887)
All 9 stages validated end-to-end: